package com.taobao.top.beans;
 
/**
 * OAuth认证参数实体类
 * 
 * @author <a href="http://weibo.com/shichaosong">Shichao Song</a> 
 * @Date 2011-10-17
 * @QQ 421271944
 * @version 1.0
 */
public class KVParameter implements java.io.Serializable, Comparable<KVParameter> {
	/**
	 *  
	 */
	private static final long serialVersionUID = -9041723304674844461L;
	private String name;
	private String value;

	public KVParameter(String name, String value) {
		this.name = name;
		this.value = value;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Override
	public int compareTo(KVParameter param) {
		int compared;
		compared = this.name.compareTo(param.getName());
		if (0 == compared) {
			compared = this.value.compareTo(param.getValue());
		}
		return compared;
	}
}
